The debugging of real-time software applications often involves the recordation (e.g., logging) of events and corresponding timestamps. For example, a time difference between two timestamps corresponding to two events may be used to determine the execution time of a task, a subroutine, an interrupt service routine, etc. For the highest accuracy and the most insight into the behavior of the software, the timestamps are preferably cycle-accurate. That is, the timestamps have a time resolution no greater than the cycle time of the clock of the processor operating the real-time software.
However, in many low-power applications such as, for example, a battery operated cellular telephone, a processor may selectively power-down the processor and the processor's clock. In such circumstances, a time difference between two events may not be determinable and/or may be inaccurate. For example, consider a timeline wherein a first event is logged, the processor's clock is powered down, the processor's clock is subsequently restarted, and the processor then logs a second event. Since, the clock was powered down between the first and the second events, the time that elapsed between the first and the second events is not accurately reflected and/or captured by the processor's clock.